package org.xx.armory.swing.builders;

import static org.apache.commons.lang3.StringUtils.trimToEmpty;

public class PlaceholderModelBuilder
        extends ComponentModelBuilder<PlaceholderModel> {
    private String className;
    private boolean scrollable;

    public PlaceholderModelBuilder() {
    }

    public final PlaceholderModelBuilder setClassName(
            String className
    ) {
        this.className = className;
        return this;
    }

    public final PlaceholderModelBuilder setScrollable(
            boolean scrollable
    ) {
        this.scrollable = scrollable;
        return this;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public PlaceholderModel build() {
        return new PlaceholderModel(getLineInfo(),
                                    getName(),
                                    isVisible(),
                                    trimToEmpty(this.className),
                                    this.scrollable);
    }
}
